document.addEventListener("DOMContentLoaded", function () {
    // 检查是否有注册成功的消息
    const successMessage = "{{ messages }}";
    if (successMessage.includes("Your account has been created!")) {
        alert("注册成功 请 登录");
    }
    if (successMessage.includes("Duplicate username")) {
        alert("用户名已被创建")
    }
});
